package com.weishaoying.example.base.profile;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;

/**
 * @author WeiShaoying
 * @date 2018/4/4
 */
@Configuration
public class JavaConfig {
    @Bean
    @Profile("dev")
    public Dog devDog() {
        return new Dog("开发狗");
    }

    @Bean
    @Profile("test")
    public Dog testDog() {
        return new Dog("测试狗");
    }

    @Bean
    @Profile("prod")
    public Dog prodDog() {
        return new Dog("生产狗");
    }
}
